package main;
import heuristic.HanoiTowerEvaluationFunction;
import heuristic.HillClimbing;
import heuristic.HillClimbingwithLog;
import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFS;
import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFS;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFS;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFSwithLog;
import formulation.HanoiTowerProblem;

public class MainProgram
{
	public static void main(String[] args)
	{
		try
		{
			// Numero de Soportes | Numero de Discos | Soporte Inicial | Soporte Final
			HanoiTowerProblem problem = new HanoiTowerProblem(3, 4, 1, 3);
			
			//StateXMLReader entornoSAXParser = new EnvironmentXMLReader("data/InitialState.xml"); 								
			//State initialState = entornoSAXParser.getState();
			
			problem.addInitialState(problem.getInitialStates().get(0));		
//			problem.solve(BreadthFSwithLog.getInstance());
			System.out.println("");
//			problem.solve(DepthFSwithLog.getInstance());
//			problem.solve(new BestFS(new HanoiTowerEvaluationFunction()));
			problem.solve(new HillClimbing(new HanoiTowerEvaluationFunction()));
		}
		catch (Exception ex)
		{
			System.err.println("% [Main Program] Error: " + ex.getMessage());
			ex.printStackTrace();
		}
	}
}